﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hyt.Core.Authentication;
using Hyt.Core.Cache.Providers;
using Hyt.Passport.Persist;
using Hyt.Core.Security;

namespace Hyt.Test.Ioc
{
    public class Impl_Hyt_Core:Hyt.Core.IocSetting
    {
        public override List<Core.Authentication.IAuthRule> GetAuthRules()
        {
            return new List<IAuthRule>() {new TestAuthRule()};
        }

        public override Type GetCacheProviderType()
        {
            return typeof (StaticProvider);
        }


        public override List<Core.Security.ICustomPrincipalResolver> GetCustomPrincipalResolvers(Autofac.ContainerBuilder builder, Core.IUnitOfWork unitOfWork)
        {
            return new List<ICustomPrincipalResolver>() { unitOfWork.Get<PassportPrincipalResolver>() };
        }
    }
}
